package com.hjd.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.hjd.shop.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 * MQ消息消费者表
 * </p>
 *
 * @author 胡江迪
 * @since 2020-10-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mq_consumer_log")
public class MqConsumerLog extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 消息ID
     */
    @TableId(value = "msg_id", type = IdType.ASSIGN_ID)
    private String msgId;

    /**
     * 消费者组名
     */
    private String groupName;

    /**
     * Tag
     */
    private String msgTag;

    /**
     * key
     */
    private String msgKey;

    private String msgBody;

    /**
     * 消费状态：0正在处理；1处理成功；2处理失败
     */
    @Version
    private int consumerStatus;

    /**
     * 消费次数
     */
    private Integer consumerTimes;

    /**
     * 消费时间
     */
    private Date consumerTime;

    /**
     * 备注
     */
    private String remake;


}
